Logimix: A Self-Applicable Partial Evaluator for Prolog
نویسندگان
چکیده
We present a self-applicable partial evaluator for a large subset of full Prolog. The partial evaluator, called Logimix, is the result of applying our experience from partial evaluation of functional languages to Prolog. Great care is taken to preserve the operational semantics of the partially evaluated programs, including the effects of non-logical predicates and side effects. At the same time, we also want the partial evaluator to handle large programs in reasonable time. This has led us to use simple strategies whenever possible, in particular we let most of the choices made during partial evaluation depend on the results of a prior binding time analysis. We have successfully applied Logimix to interpreters, yielding compiled programs where virtually all interpretation overhead is removed. Self-application of Logimix yields stand-alone compilers and a compiler generator. To obtain a clear distinction between the different meta-levels when doing self-application, input programs to the partial evaluator are represented as ground terms (as in e.g. [4]). Nevertheless, we implement unification in the partial evaluator by unification in the underlying Prolog system. This significantly improves upon [4] which use explicitly coded meta-unification. We show the text of the central parts of the partial evaluator.
منابع مشابه
LIX: an Effective Self-applicable Partial Evaluator for Prolog
This paper presents a self-applicable partial evaluator for a considerable subset of full Prolog. The partial evaluator is shown to achieve non-trivial specialisation and be effectively self-applied. The attempts to self-apply partial evaluators for logic programs have, of yet, not been all that successful. Compared to earlier attempts, our lix system is practically usable in terms of efficienc...
متن کاملAn Asm Implementation of a Self-applicable Partial Evaluator
Partial evaluation is a technique for specializing programs with respect to parts of their input. We describe an o ine partial evaluator mixASM for Abstract State Machines, written in the ASM language itself. The partial evaluator is self-applicable, so some problems related to self-application are discussed. This work concentrates on the implementation of mixASM , presenting all algorithms in ...
متن کاملPreliminary Report on a Self-Applicable Online Partial Evaluator for Flowchart
This is a preliminary report on a self-applicable online partial evaluator for a flowchart language with recursive calls. Self-application of the partial evaluator yields generating extensions that are as efficient as those reported in the literature for offline partial evaluation. This result is remarkable because partial evaluation folklore has indicated that online partial evaluation techniq...
متن کاملA Self - Applicable Partial Evaluator for the Logic Programming Language
Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of meta-interpreters by the so-called " Futamura Projections ". Meta-interpreters and other meta-programs are programs which use another program as data. The Futamura projections also show that partial evaluator which is self-applicable (...
متن کاملA Self-Applicable Partial Evaluator for ASM
This paper presents an ooine partial evaluator for Abstract State Machines. Self-application is possible by means of a simpliied version of the partial evaluator written in ASM itself. Using self-application, we have generated compilers for small languages from their interpreter deenitions. We also present techniques for describing the semantics of programming languages, in a way suitable for p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1992